/**
 * Show plural label if time is plural number
 * @param {number} time
 * @param {string} label
 * @return {string}
 */
export function pluralTime(time, label) {
    if (time === 1) {
        return time + label
    }
    return time + label + 's'
}

export function nameOfUser(user) {
    return user ? user.nickname ? user.nickname : user.realName ? user.realName : user.username ? user.username : 'Nobody' : '';
}
